<template>
  <div id="app">
    <router-view />
  </div>
</template>
<script>
export default {
  methods: {
    clickFullScreen() {
      document.documentElement.onclick = function() {
        let Fullscreen = document.getElementById("app");
        if (Fullscreen.requestFullscreen) {
          Fullscreen.requestFullscreen();
        } else if (Fullscreen.webkitRequestFullScreen) {
          // 对 Chrome 特殊处理，
          // 参数 Element.ALLOW_KEYBOARD_INPUT 使全屏状态中可以键盘输入。
          if (window.navigator.userAgent.toUpperCase().indexOf("CHROME") >= 0) {
            Fullscreen.webkitRequestFullScreen(Element.ALLOW_KEYBOARD_INPUT);
          }
          // Safari 浏览器中，如果方法内有参数，则 Fullscreen 功能不可用。
          else {
            Fullscreen.webkitRequestFullScreen();
          }
        } else if (Fullscreen.mozRequestFullScreen) {
          Fullscreen.mozRequestFullScreen();
        }
      };
    }
  },
  mounted() {
    //点击开启全屏
    // this.clickFullScreen()
  }
};
</script>
<style lang="less">
@import url("./assets/css/reset.css");
#app {
  font-family: "Avenir", Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
  height: 100vh
}
#nav {
  padding: 30px;

  a {
    font-weight: bold;
    color: #2c3e50;

    &.router-link-exact-active {
      color: #42b983;
    }
  }
}
ul li {
  list-style: none;
}
* {
  margin: 0;
  padding: 0;
}
</style>
